home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1990 March / 1990-03.d64 / raster master (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  78 lines

  1. 10 rem copyright 1990 compute! publications, inc. - all rights reserved
  2. 20 gosub710:rem go set up cover-up sprites
  3. 30 if peek(49152)<>76 then load"raster.ml",8,1
  4. 40 sys49161:rem disable routine in case it's active
  5. 50 dimv$(25):v$(0)="":fori=1to24:v$(i)=v$(i-1)+"":next:poke53280,0
  6. 60 rem create 1-line window offscreen to prevent screen flashes
  7. 70 poke820,250:rem place window y-coordinate in 820
  8. 80 poke821,1:rem assign number of lines (1) in window in 821
  9. 90 rem position cover-up sprites on either side of window to simulate margins
  10. 100 poke53248,10:poke53249,120:rem sprite0 x position, sprite0 y position
  11. 110 poke53252,40:poke53253,120:rem spr2 x position, spr2 y position
  12. 120 poke53248+16,12:rem set high bit of spr2 and spr3 horizontal coordinate
  13. 130 poke53248+21,15:rem enable sprites 0-3
  14. 140 poke53281,0:print"[147][144]"v$(12)tab(5)"compute!'s gazette presents:"
  15. 150 sys49152:sys49155,3,150,10,50:rem open window
  16. 160 gosub700:sys49158:gosub700:rem pause and then close window
  17. 170 poke53250,40:poke53251,120:rem spr1 x position, spr1 y position
  18. 180 poke53254,10:poke53255,120:rem spr3 x position, spr3 y position
  19. 190 printv$(12)tab(5)"        raster master         "
  20. 200 sys49155,6,12*8+54,10,50:gosub700:sys49158:gosub700
  21. 210 poke53248+21,0:rem disable all sprites
  22. 220 print"[147]"v$(8)tab(7)"fantastic presentations"v$(10)tab(14)"for all your"
  23. 230 printv$(12)tab(21)"programs"
  24. 240 sys49155,11,12*8+42,50,20:gosub700:gosub700
  25. 250 printv$(9)tab(7)"[151]all created"v$(11)tab(14)"with the help"
  26. 260 printv$(13)tab(21)"of raster master"
  27. 270 sys49158:gosub700:gosub700
  28. 280 poke53280,0:print"[147]":fortt=1to3
  29. 290 printv$(8)"   [144]this is the             "v$(10)tab(7)"mixup effect"
  30. 300 printv$(12)tab(12)"mixing screen text..."
  31. 310 poke820,250:poke821,1:sys49155,6,12*8+50,50,10:gosub700
  32. 320 printv$(7)"   see how this"v$(9)tab(7)"text appears as"
  33. 330 printv$(15)tab(12)"the other disappears "
  34. 340 sys49158:next
  35. 350 gosub700:gosub700
  36. 360 print"[147][155]this is the curtain effect[144]"
  37. 370 fori=2to22:printv$(i)tab(9)"compute!'s gazette":next
  38. 380 poke820,250:poke821,1:sys49155,15,250,200,20:gosub700:gosub700
  39. 390 print"                                     "
  40. 400 sys49158:print"[147]":sys49161
  41. 410 poke820,250:poke821,1:poke53280,6:poke53281,6:sys49152
  42. 420 sys49155,2,89,1,50:vx=89:poke820,vx:poke821,vx+9
  43. 430 print"[147][154]create a menu or selector bar"
  44. 440 print"[158]use <up> & <down> cursors to move"
  45. 450 print"press <q> to quit[144]":print
  46. 460 fori=1to9:print"     ";:forj=1to4:print"line"str$(i)" ";:next:print:next
  47. 470 fori=10to19:print"   ";:forj=1to4:print"line"str$(i)" ";:next:print:next
  48. 480 geta$:ifa$="[145]"then520
  49. 490 ifa$=""then540
  50. 500 ifa$<>"q"then480
  51. 510 goto560
  52. 520 vx=vx-8:ifvx<89thenvx=89
  53. 530 poke820,vx:poke821,vx+9:goto480
  54. 540 vx=vx+8:ifvx>233thenvx=233
  55. 550 poke820,vx:poke821,vx+9:goto480
  56. 560 sys49158:gosub700:sys49161:poke53281,0:sys49152:poke820,250:poke821,1
  57. 570 print"[147][159]you can vary speed and color"
  58. 580 a=40:fori=1to7:a=a-5:sys49155,int(rnd(1)*7)+7,90,15,a
  59. 590 sys49158:gosub700:next:poke53280,0:poke53281,0:poke820,250:poke821,1
  60. 600 poke53248+21,15
  61. 610 print"[147]"v$(10)tab(6)"[209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209]"
  62. 620 fori=11to13:printv$(i)tab(6)"[209]"tab(31)"[209]":next
  63. 630 printv$(14)tab(6)"[209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209][209]"
  64. 640 printv$(12)tab(10)"[144](r)estart or (e)nd[159]"
  65. 650 sys49155,3,150,10,100:gosub700
  66. 660 geta$:sys49158:ifa$=""then640
  67. 670 ifa$="r"thensys49161:run
  68. 680 ifa$<>"e"then640
  69. 690 sys49161:print"[147][159]":end
  70. 700 fordy=1to500:next:return
  71. 710 fori=832toi+63:pokei,255:next:rem define solid block sprite
  72. 720 poke53248+23,255:poke53248+29,255:rem expand all sprites in x and y direct.
  73. 730 poke53248+27,255:rem set sprite priority over foregrd color
  74. 740 fori=53248+39toi+7:pokei,0:next:rem set all sprites to background color
  75. 750 fori=2040to2047:pokei,13:next:rem set pointers to sprite definition data
  76. 760 fori=53248toi+15:pokei,0:next:rem locate all sprites at 0,0
  77. 770 return
  78.